1. Field of the Invention
The present invention relates to information presentation in a computer system, and deals more particularly with a technique, system, and computer program for using servlets to isolate the retrieval of data from the rendering of the data into a presentation format.
2. Description of the Related Art
As the science of computer programming has evolved over the past several decades, one of the principles that has developed from experience is that it is good programming practice to isolate the code that implements data retrieval from the code that renders that retrieved data into a presentation format. The advantage of this type of code structuring became apparent when software applications began to be used internationally, and it was necessary to present retrieved data in more than one language. The messages, headings, and other types of textual information presented by the computer program needed to be in the language of the user of that program. If the text was not originally created in a language understood by the user, then translation into another language was required. By isolating textual information from the code required for presentating that text to the user (whether by displaying it on a screen, printing it on paper, or other means), the task of locating the textual information, in order to translate it, was simplified.
This manner of isolating code which performs one function from code that performs a different function has become standard practice as structured programming came into common usage. Not only does the isolation make location of the relevant code easier, but it also makes changes easier (because locating the code to be changed is often a significant part of the change effort), and it makes changes less error-prone (because it is more likely that all the code needing change will be located, and will therefore be changed).
When code for presenting information to the user is properly isolated, ease of translation into other languages is only one benefit. It also becomes much easier to adapt the information for presentation on different types of media. For example, computer display screens were once limited to presenting text, where that text was limited by the constraints of the display screen to a matrix of 80 characters in each of 24 lines. The display screens in common usage today do not have such constraints, and support display of text, graphics, video, etc.--where the matrix has effectively expanded to tens of thousands of tiny display elements. While not all changes in media are this dramatic, similar issues arise if changes are made to the manner in which data formatting instructions are represented. If the definition of the formatting instructions is revised or enhanced, the logic implementing those formatting instructions may need to be changed to align it with the new definition. When presentation formatting logic has been isolated, the task of adapting to presentation in an alternative environment, or formatting using different instructions, becomes much simpler.
Today, hundreds of software applications are being written for use on the Internet. The Internet is a vast collection of computing resources, interconnected as a network, from sites around the world. The Internet has had a fairly short life span thus far, having originated some twenty years ago and only recently coming into everyday use by millions of people throughout the world. As computer programmers rush to provide software applications for use on the Internet, often in newly-developed programming languages written for the specific needs of the Internet, some of the lessons of the past are overlooked.
A user of the Internet typically accesses and uses the Internet by establishing a network connection through the services of an Internet Service Provider (ISP). An ISP provides computer users the ability to dial a telephone number using their computer modem (or other connection facility, such as satellite transmission), thereby establishing a connection to a remote computer owned or managed by the ISP. This remote computer then makes services available to the user's computer. Typical services include: providing a search facility to search throughout the interconnected computers of the Internet for items of interest to the user; a browse capability, for displaying information located with the search facility; and an electronic mail facility, with which the user can send and receive mail messages from other computer users.
The present invention deals with using the search and browse capabilities, whereby the user requests to see information from the Internet, and that information is presented on the display screen of the user's computer.
The user will have software running on his computer to allow him to make search requests, and to see the search results. These functions are typically combined in what is referred to as a "Web browser", or "browser". After the user has created a search request using the browser, a message is sent out into the Internet to carry out the request. The target of the request message is one of the interconnected computers in the Internet network. That computer will receive the message, attempt to find the data satisfying the user's request, format that data for display with the user's browser, and return the formatted information to the browser software running on the user's computer.
This is an example of a client-server model of computing, where the machine at which the user requests information is referred to as the client, and the computer that locates the information and returns it to the client is the server. When this scenario is implemented using the Internet, the browser running on the client's machine accepts the data it will display in response to the user's request, by convention, as a data stream formatted using the HyperText Markup Language ("HTML"). The phrase "data stream", when used herein, is to be construed as applying equally to data received as if it were an incoming stream (for example, from an input buffer) and to data that has been received in this manner and stored in a file. HTML is a standardized notation for displaying text and graphics on a computer display screen, as well as providing more complex information presentation such as animated video, sound, etc. Because browsers expect an incoming response to be formatted using HTML, servers generate their response in that format. This represents a step backward in programming methodology, however, as it condones a lack of separation between the logic involved in accessing and processing data, and the logic implementing the knowledge of how the data is to be formatted for user display and interaction. If changes are made to the HTML notation, the server code must be revised to support the changes. If changes are made to media, the presentation formatting logic may need to be revised to adapt to those media changes. It would be easier to locate and change the necessary code if that code had been implemented in a modular fashion, whereby the data retrieval logic was isolated from the data presentation formatting logic. This type of code isolation would also allow complete replacement of the presentation formatting logic (for example, if a different presentation formatting notation replaced HTML), without disruption of the code implementing the data retrieval logic.
Accordingly, a need exists for a technique by which information retrieval logic can be isolated from information presentation formatting logic. Further, a need exists for a system and method by which this isolation technique allows efficient use of multiple components for information retrieval, as well as multiple components for information formatting. The multiple components may implement similar manners of data retrieval and formatting, respectively, or they may implement alternative manners of retrieval and formatting. The proposed technique provides the required logic isolation in a way that enables different retrieval or formatting implementations to be quickly and easily substituted into the computing environment, as may be needed to adapt to changes in retrieval or formatting requirements. Further, the proposed technique enables additional data retrieval or formatting implementations to be quickly and easily added into the computing environment, which will provide greater flexibility in the manner in which data can be presented, and which may also increase overall system throughput and alleviate potential processing bottlenecks. The isolation technique should be provided using widely-accepted programming techniques and data formatting notations, in order to increase industry acceptance and maximize the advantages of the present invention.